package com.android.vgongyi.mapper;

import android.text.TextUtils;

import com.android.vgongyi.common.AppApiPreference;

public class WateFallRequest  extends BaseRequest{

	private String flag;
	private String id;
	/**
	 * mini blog item's id
	 * */
	private String itemId;
	
	public WateFallRequest(String flag, String id) {
		this.flag = flag;
		this.id = id;
	}
	

	
	public String executeToREST() {
		StringBuffer buffer = new StringBuffer();
		if(TextUtils.isEmpty(itemId)){

			//buffer.append(super.CommonHeader);
			//FIXME  -  use online parameter @clouse_LJQ 
			buffer.append(AppApiPreference.LATEST_BLOG_URL);
			
		}else{
			
			//FIXME  -  use online parameter @clouse_LJQ 
			buffer.append(String.format(AppApiPreference.LOAD_STATUS_URL, itemId));
			
			//old codes
			//buffer.append(super.CommonHeader);
			//buffer.append("index.php").append(AppConstant.CHARACTER_QUESTION);
			//buffer.append("from_id").append(AppConstant.CHARACTER_EQUAL).append(itemId);

		}	
		if(flag.equals("0")){
			return "http://test.ci77.com/weigongyi/index.php?mod=image&flag=0&id="+id;
		}
		return "http://test.ci77.com/weigongyi/index.php?mod=image&flag=1&id="+id;
		
	}
	
	
	
	
	
	
	
}
